package com.itheima.utils;

public class Demo {




    public static void main(String[] args) {
       /* List<Student> students = new ArrayList<>();
        students.add(new Student(1, null, 18));
        students.add(new Student(2, null, 20));
        students.add(new Student(3, null, 23));
        students.add(new Student(4, null, 20));
        students.add(new Student(5, null, 17));
        students.add(new Student(6, null, 15));


        List<Name> names = new ArrayList<>();
        names.add(new Name(1, "张三"));
        names.add(new Name(2, "李四"));
        names.add(new Name(3, "王五"));
        names.add(new Name(4, "赵六"));
        names.add(new Name(5, "田七"));
        names.add(new Name(6, "马八"));

        List<Student> studentList = students.stream().map(student -> {return names.stream().filter(name -> {*//*条件判断*//*return student.getId() == name.getId();}).map(name -> {student.setName(name.getName());return student; *//*返回的结果*//*})
                .collect(Collectors.toList());
        }).flatMap(List::stream).collect(Collectors.toList());//设置返回结果类型
        System.out.println(studentList);*/





    }



}
